package com.zzyl.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class DemoTask {
    private static final Logger log = LoggerFactory.getLogger(DemoTask.class);

    /**
 * 定时使用该方法
 */
@Scheduled(cron = " 0 0 1 * * ?")
    public void task(){
    log.info("执行了");
}

}
